<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>管理员登录</title>
    <style>
        body { background: #f5f5f5; font-family: 'Microsoft YaHei', Arial, sans-serif; }
        .login-container { width: 400px; margin: 100px auto; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 40px; }
        h2 { text-align: center; margin-bottom: 30px; }
        .form-group { margin-bottom: 20px; }
        label { display: block; margin-bottom: 8px; }
        input[type="text"], input[type="password"] {
            width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; background: #f0f6ff;
        }
        .login-btn {
            width: 100%; padding: 12px; background: #2196F3; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer;
        }
        .login-btn:hover { background: #1976D2; }
        .error { color: #e53935; text-align: center; margin-bottom: 15px; }
    </style>
</head>
<body>
<div class="login-container">
    <h2>管理员登录</h2>
    <% if (request.getAttribute("error") != null) { %>
        <div class="error">${error}</div>
    <% } %>
    <form action="guanliyuan_login" method="post">
        <div class="form-group">
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required value="<%= request.getParameter("username") == null ? "" : request.getParameter("username") %>"/>
        </div>
        <div class="form-group">
            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required />
        </div>
        <button type="submit" class="login-btn">登录</button>
    </form>
</div>
</body>
</html> 